package neu.soft.producer;


import neu.soft.vo.MsgBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

@Component
public class ProduceService {

    @Autowired
    OutputBinding outputBinding;

    public boolean send(List<String> oid){
        Message<MsgBean<List<String>>> msgBeanMessage = MessageBuilder.withPayload(new MsgBean<List<String>>(oid, "发送oid")).build();
        return outputBinding.sendGoods().send(msgBeanMessage);
    }

}
